var xmldoc = {
    request: function() {
        var message = {
            cmd: "getXML"
        };
        var callback = function(data) {
            xmldoc.data = $.parseXML(data);
        };
        if (chrome.extension.sendMessage) chrome.extension.sendMessage(message, callback); else chrome.extension.sendMessage(message);
    },
    getShareURL: function() {
        return $(xmldoc.data).find("share").attr("url");
    }
};